home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / kernserv / clock_timer.h < prev    next >
Text File  |  1995-02-14  |  877b  |  37 lines

  1. /*
  2.  * The machine independent clock and timer definitions.
  3.  *
  4.  * Copyright (c) 1989 NeXT, Inc.
  5.  *
  6.  * HISTORY
  7.  *
  8.  *  6Dec91 Brian Pinkerton at NeXT
  9.  *    Created.
  10.  */
  11. #import <mach/mach_types.h>
  12. #import    <mach/boolean.h>
  13. #import <bsd/sys/time.h>
  14. #import <bsd/sys/callout.h>
  15.  
  16. typedef    unsigned long long    ns_time_t;    /* nanoseconds! */
  17.  
  18. typedef struct chrono_attributes {
  19.     ns_time_t    max_value;    /* max value of clock or timer */
  20.     ns_time_t    resolution;    /* actual hardware accuracy */
  21. } *chrono_attributes_t;
  22.  
  23. typedef enum {
  24.     Calendar,    /* assumed battery back-up */
  25.     System,        /* assumed "highest resolution available" */
  26. } clock_types_t;
  27.  
  28.  
  29. /*
  30.  *  Clock functions.  These can be called from any ipl.
  31.  */
  32. ns_time_t clock_value(clock_types_t which_clock);
  33. void set_clock(clock_types_t which_clock, ns_time_t ns);
  34. const struct chrono_attributes *clock_attributes(clock_types_t which_clock);
  35.  
  36.  
  37.